package com.xpengplayer.data;

import java.io.Serializable;
import java.util.Date;

/**
 * 收藏目录模型类
 */
public class FavoriteDirectory implements Serializable {
    private String directoryPath;  // 目录路径
    private String directoryName;  // 目录名称
    private long addTime;  // 添加时间戳

    public FavoriteDirectory(String directoryPath, String directoryName) {
        this.directoryPath = directoryPath;
        this.directoryName = directoryName;
        this.addTime = new Date().getTime();
    }

    public String getDirectoryPath() {
        return directoryPath;
    }

    public void setDirectoryPath(String directoryPath) {
        this.directoryPath = directoryPath;
    }

    public String getDirectoryName() {
        return directoryName;
    }

    public void setDirectoryName(String directoryName) {
        this.directoryName = directoryName;
    }

    public long getAddTime() {
        return addTime;
    }

    public void setAddTime(long addTime) {
        this.addTime = addTime;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj) return true;
        if (obj == null || getClass() != obj.getClass()) return false;
        FavoriteDirectory that = (FavoriteDirectory) obj;
        return directoryPath.equals(that.directoryPath);
    }

    @Override
    public int hashCode() {
        return directoryPath.hashCode();
    }
}